
#ifndef W32WINDOW_H_
#define W32WINDOW_H_

#if defined(_WIN32)

#include "Window.h"

namespace p2 {

class W32Window: public Window
{
public:
	W32Window(WindowCreateStruct const& cs);
	virtual ~W32Window();

	int32 create();
	void show(bool show = true) const;
	Vector2<real> getCursorPosition() const;
	void swapBuffers() const;
	int32 processContinue();

private:
	int32 create(char const* className, char const* windowName);
	bool setPixelFormat();
	void setPalette();
	void killGLWindow(void);

public:
	EGLContext _eglContext;
	EGLConfig _eglConfig;
	EGLDisplay _eglDisplay;
	EGLSurface _eglSurface;
	HINSTANCE _hInstance;
	HWND _hWnd;
	HDC _hDC;
	HGLRC _hglrc;
	HPALETTE _hPalette;
	String _className;
};

}

#endif	//#if defined(_WIN32)

#endif	//W32WINDOW_H_
